package com.botarena.server.dao;

import java.util.Collection;
import java.util.List;

import com.botarena.server.dao.filter.Filter;
import com.botarena.server.model.Entity;
import com.google.appengine.api.datastore.Key;

public interface DAO<E extends Entity> {
	
	public void create(E entity);
	
	public void create(Collection<E> entities);
	
	public void delete(E entity);
	
	public void deleteAll(Collection<E> entities);
	
	public int deleteAll(int limit);
	
	public List<E> getAll();
	
	public List<E> getAll(Filter<E> filter);
		
	public E getByKey(Key key);
	
	public E getByKey(String key);
	
	public Collection<E> getByKeys(Collection<Key> keys);
}
